package com.clwl.supervise.superviseapp.entity.supervise;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
    * 问题整改
    */
@Data
@TableName(value = "JG_RECTIFICATION")
//@KeySequence(value = "JG_RECTIFICATION_SEQ")
public class JgRectification implements Serializable {



    @TableId(value = "ID", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;


    /**
     * 如果整改结果是不通过，则记录此整改单是通过哪个整改单流转过来的
     */
    @TableField(value = "PARENT_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    /**
     * 检查类型(1-日常检查;2-双随机检查；3-飞行检查；4-体系检查)
     */
    @TableField(value = "COMPANY_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long companyId;

    /**
     * 根据检查类型关联检查单子ID
     */
    @TableField(value = "CHECK_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long checkId;

    /**
     * 检查类型；1-日常检查；2-双随机检查；3-飞行检查；4-体系检查;5-动态评分;6-专项检查(非计划任务)
     */
    @TableField(value = "CHECK_TYPE")
    private String checkType;

    /**
     * 整改状态1-待整改。2-已整改
     */
    @TableField(value = "CHECK_STATUS")
    private String checkStatus;

    /**
     * 整改结果1-通过。2-不通过
     */
    @TableField(value = "CHECK_RESULT")
    private String checkResult;

    /**
     * 核查人员1-ID
     */
    @TableField(value = "CHECK_PERSONNEL1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long checkPersonnel1;

    /**
     * 核查人员2-ID
     */
    @TableField(value = "CHECK_PERSONNEL2")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long checkPersonnel2;

    /**
     * 核查人员1-名称
     */
    @TableField(value = "CHECK_PERSONNEL_NAME1")
    private String checkPersonnelName1;

    /**
     * 核查人员2-名称
     */
    @TableField(value = "CHECK_PERSONNEL_NAME2")
    private String checkPersonnelName2;

    /**
     * 整改完成时限
     */
    @TableField(value = "RECTIFICATION_TIME_LIMIT")
    private String rectificationTimeLimit;

    /**
     * 整改核查时间
     */
    @TableField(value = "CHECK_TIME")
    private String checkTime;

    /**
     * 核查意见
     */
    @TableField(value = "CHECK_OPINION")
    private String checkOpinion;

    /**
     * 创建时间（发件时间）
     */
    @TableField(value = "CREATE_TIME")
    private Date createTime;

    /**
     * 创建人id
     */
    @TableField(value = "CREATOR_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long creatorId;

    /**
     * 创建人姓名
     */
    @TableField(value = "CREATOR_NAME")
    private String creatorName;

    /**
     * 修改时间
     */
    @TableField(value = "UPDATE_TIME")
    private Date updateTime;

    /**
     * 修改人id
     */
    @TableField(value = "UPDATE_USER_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long updateUserId;

    /**
     * 修改人姓名
     */
    @TableField(value = "UPDATE_USER_NAME")
    private String updateUserName;

    /**
     * 删除时间
     */
    @TableField(value = "DELETE_TIME")
    private Date deleteTime;

    /**
     * 删除人id
     */
    @TableField(value = "DELETE_USER_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deleteUserId;

    /**
     * 删除人姓名
     */
    @TableField(value = "DELETE_NAME")
    private Long deleteName;

    /**
     * 是否删除
     */
    @TableField(value = "DELETE_FLAG")
    private Long deleteFlag;

    /**
     * 是否转为立案1-是；2-否
     */
    @TableField(value = "TRANSFER_TO_FILE")
    private String transferToFile;

    /**
     * 整改审核时间
     */
    @TableField(value = "VERIFICATION_TIME")
    private String verificationTime;

    /**
     * 整改审核状态0-未核查；1-已核查
     */
    @TableField(value = "VERIFICATION_STATUS")
    private String verificationStatus;

    /**
     * 下一次整改时间(整改不通过的情况下)
     */
    @TableField(exist = false)
    private String nextRectificationTimeLimit;

    /**
     * 问题项列表
     */
    @TableField(exist = false )
    private List<JgRectificationContent> rectificationContentList;
    /**
     * 问题整改图片
     */
    @TableField(exist = false )
    private List<JgRectificationImage> rectificationImageList;

    /**
     * 监管环节，页面查询需要
     */
    @TableField(exist = false )
    private String subProcess;

    private static final long serialVersionUID = 1L;
}
